<?
	$hostname='localhost';
	$username='root';
	$password='';
	$database='dbsewavcd';

	$conn=mysql_connect($hostname, $username, $password) or die("Cann't Connect server");
	$eeek=mysql_select_db($database, $conn) or die("Cann't Connect database");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml" lang="id"><head>
<title>Izil Disk Rental</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">
<!--
body, p, td {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; line-height: 150%;}
pre {font-size: 12px; padding-left: 12px; border-left-width: 3px; border-left-style: solid; border-left-color: silver; background-color: #eaeaea;}
a:hover {background-color: gainsboro; text-decoration: none;}
a:link {color: gray; border-bottom: 1px dotted silver; text-decoration: none;}
a:visited {color: gray; border-bottom: 1px dotted silver; text-decoration: none;}
a:active {color: gray; border-bottom: 1px dotted silver; text-decoration: none;}
h1 {font-size: 20px; margin-top: 20px; margin-bottom: 20px;}
h2 {font-size: 18px; margin-top: 18px; margin-bottom: 18px; text-align: center;}
h3 {font-size: 15px; margin-top: 15px; margin-bottom: 15px;}
.noborder {border: 0px none;}
.title {font-size: 18px; line-height: normal; font-weight: bold; color: gray;}
img {border: 0px none; vertical-align:middle;}
table {border: 2px solid silver; background-color: white; table-layout: fixed; max-width:800px;}
td {border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: silver; text-align: right; vertical-align: top; overflow: hidden;}
form {margin: 0;}
-->
</style>
</head>
<body background="images/background.gif">

<div align="center">
<table border="0" cellpadding="12" cellspacing="0" width="70%">
<tbody>
<tr>
	<td align="left" bgcolor="papayawhip" width="60" valign="top">&nbsp;</td>
	<td align="left" bgcolor="papayawhip" valign="top"><b>Izil Disk Rental</b></td>
</tr>
</tbody>
</table>
</div><br>

<div align="center">
<table border="0" cellpadding="12" cellspacing="0" width="70%">
<tbody>
<tr>
	<td bgcolor="#e9e9e9" width="60" valign="top"><img src="images/indonesia.gif"></td>
	<td bgcolor="white" valign="top">Form Data VCD Rental</td>
</tr>
<tr>
	<td bgcolor="#e9e9e9" width="60" valign="top">&nbsp;</td>
	<td bgcolor="white" valign="top">
		<form name="form1" method="post" action="proses/kirim_vcdrental.php">
		Kode VCD: <input type="text" name="kode_vcd" maxlength="8" size="40"/><br>
		Judul Film: <input type="text" name="judul_film" maxlength="30" size="40"/><br>
		Harga Sewa: <input type="text" name="harga_sewa" maxlength="5" size="40"/><br>
		Stock: <input type="text" name="stock" maxlength="3" size="40"/><br>
		<input type="submit" value="simpan" name="submit"/> <input type="reset" value="segarkan" name="reset"/>
		</form>
	</td>
</tr>
</tbody>
</table>
</div><br>

<div align="center">
<table border="0" cellpadding="12" cellspacing="0" width="70%">
<tbody>
<tr>
	<td bgcolor="white" width="60" valign="top"><img src="images/filearchive.png"></td>
	<td bgcolor="white" valign="top">Table Data VCD Rental</td>
</tr>
<tr>
	<td bgcolor="white" width="60" valign="top">&nbsp;</td>
	<td bgcolor="white" valign="top">
		<table>
		<tbody>
		<tr>
			<td width="80">Hapus</td>
			<td width="100">Kode VCD</td>
			<td width="240">Judul Film</td>
			<td width="100">Harga Sewa</td>
			<td width="80">Stock</td>
		</tr>
		<?
		$cari1 = mysql_query("select * from vcdrental order by kode_vcd");
		while($hasil1 = mysql_fetch_array($cari1)){
		echo "<tr>
			<td><a href=\"proses/hapus_vcdrental.php?kode_vcd=$hasil1[0]\">Hapus</td>
			<td>$hasil1[0]</td>
			<td>$hasil1[1]</td>
			<td>$hasil1[2]</td>
			<td>$hasil1[3]</td>
		</tr>";
		}
		?>
		</tbody>
		</table>
	</td>
</tr>
</tbody>
</table>
</div><br>

<div align="center">
<table border="0" cellpadding="12" cellspacing="0" width="70%">
<tbody>
<tr>
	<td bgcolor="#e9e9e9" width="60" valign="top"><img src="images/indonesia.gif"></td>
	<td bgcolor="white" valign="top">Form Data Peminjaman VCD</td>
</tr>
<tr>
	<td bgcolor="#e9e9e9" width="60" valign="top">&nbsp;</td>
	<td bgcolor="white" valign="top">
		<form name="form2" method="post" action="proses/kirim_peminjaman.php">
		No. Faktur: <input type="text" name="no_faktur" maxlength="8" size="40"/><br><br>
		Kode VCD:
		<select size="1" name="kode_vcd">
		<option>--- pilih ---</option>
		<?
		$pencarian1 = mysql_query("select kode_vcd from vcdrental");
		while($laporan1 = mysql_fetch_array($pencarian1)){
			echo "<option>$laporan1[0]</option>";
		}
		?>
		</select><br>
		Judul Film: <input type="text" name="judul_film" maxlength="30" size="40"/><br>
		Harga Sewa: <input type="text" name="harga_sewa" maxlength="5" size="40"/><br>
		Stock VCD: <input type="text" name="stock_vcd" maxlength="3" size="40"/><br>
		Jumlah Pinjam: <input type="text" name="jumlah_pinjam" maxlength="3" size="40"/><br>
		<input type="submit" value="simpan" name="submit"/> <input type="reset" value="segarkan" name="reset"/>
		</form>
	</td>
</tr>
</tbody>
</table>
</div><br>

<div align="center">
<table border="0" cellpadding="12" cellspacing="0" width="70%">
<tbody>
<tr>
	<td bgcolor="white" width="60" valign="top"><img src="images/filearchive.png"></td>
	<td bgcolor="white" valign="top">Table Data Peminjaman VCD</td>
</tr>
<tr>
	<td bgcolor="white" width="60" valign="top">&nbsp;</td>
	<td bgcolor="white" valign="top">
		<table>
		<tbody>
		<tr>
			<td width="80">Hapus</td>
			<td width="100">No. Faktur</td>
			<td width="240">Judul Film</td>
			<td width="100">Harga Sewa</td>
			<td width="80">Jumlah</td>
			<td width="80">Total Byr</td>
		</tr>
		<?
		$cari2 = mysql_query("select peminjaman.no_faktur, vcdrental.judul_film, vcdrental.harga_sewa, peminjaman.jumlah_pinjam, peminjaman.total_bayar from peminjaman, vcdrental where peminjaman.kode_vcd=vcdrental.kode_vcd order by no_faktur");
		while($hasil2 = mysql_fetch_array($cari2)){
		echo "<tr>
			<td><a href=\"proses/hapus_peminjaman.php?no_faktur=$hasil2[0]\">Hapus</td>
			<td>$hasil2[0]</td>
			<td>$hasil2[1]</td>
			<td>$hasil2[2]</td>
			<td>$hasil2[3]</td>
			<td>$hasil2[4]</td>
		</tr>";
		}
		?>
		</tbody>
		</table>
	</td>
</tr>
</tbody>
</table>
</div><br>

<div align="center">
<table border="0" cellpadding="12" cellspacing="0" width="70%">
<tbody>
<tr>
	<td bgcolor="#e9e9e9" width="60" valign="top">&nbsp;</td>
	<td bgcolor="white" valign="top"><b>Izil Disk Rental</b><br>Powered By: An's Brow</td>
</tr>
</tbody>
</table>
</div>

</body></html>